#pragma once

#include "MacroDefs.h"
#include <fstream>



#define LogInit					CLog::Instance()->InitLogger
#define LogClose				CLog::Instance()->CloseLogger
#define LogEntry(s)			CLog::Instance()->WriteToLog(s, __FILE__, __LINE__, __FUNCTION__)


class CLog
{
	private:
		static CLog*		m_instance;

		char*				m_logFileName;

	private:
		CLog();

	public:
		~CLog();

		static CLog* Instance()
		{
			if(m_instance == NULL)
			{
				m_instance = new CLog();
			}
				
			return m_instance;
		}

		void InitLogger();
		void CloseLogger();
		void WriteToLog(char* eventStr, char* file, int line, char* func);
//		void AddError(String &errStr, ErrorType e, char* file, int line, char* func);
};